home *** CD-ROM | disk | FTP | other *** search
- /* $VER: DMCmtAll.rexx 1.1 (2.10.97) By J. Tierney
-
- DiskMaster II Comment All v1.1
- 10/2/97 J. Tierney
-
- Function: All selected files recieve the same comment.
-
- Usage: DMCmtAll.rexx
-
- */
-
- OPTIONS RESULTS
-
- CONFIRM 'Comment:' 'Okay' 'Cancel' '" "'
- comment = result
- comment = FixQuotes(comment)
- comment = '"' || comment || '"'
-
- STATUS P
- dir = result
- PRAGMA('D', dir)
- ADDRESS COMMAND 'C:Echo >T:txt' dir
-
- DIRLIST VAR dlist SEL
- DO i = 1 TO dlist.name.0
- ADDRESS COMMAND 'C:FileNote' dlist.name.i comment
- END
-
- DESELECT '*'
- NEWDIR dir
- EXIT 0
-
-
- /* Procedures */
-
- FixQuotes: PROCEDURE
- PARSE ARG string
- x = 1
- DO FOREVER
- x = POS('"', string, x)
- IF x ~= 0 THEN
- DO
- string = INSERT('*', string, x - 1)
- x = x + 1
- END
- ELSE LEAVE
- END
- RETURN string
-